package co.uk.j_wp.games.topdowngame;

import java.util.Timer;
import java.util.TimerTask;

public class Ticker extends TimerTask {

	// fields
	int numTicks = 0;
	private Game game;
	public int tickLength = 10;

	public Ticker(Game g) {
		this.game = g;
		Timer t = new Timer("Ticker Timer");
		t.schedule(this, tickLength, tickLength);
	}

	@Override
	public void run() {
		game.tick();
	}
}
